package test_selenium;

import org.testng.annotations.Test;

import com.webtest.core.BaseTest;

public class OurhouseTest extends BaseTest{

	// 后台登录
	@Test(priority = 0)
	public void test0() {
		webtest.open("/root/run/adm.php?login");
		webtest.type("id=fm[uname]","admin123");
		webtest.type("id=fm[upass]","admin123");
		webtest.click("xpath=//*[@id=\"fmadm\"]/p[3]/i[2]/input[4]");
		webtest.type("xpath=//*[@id=\"fmadm\"]/p[3]/i[2]/input[4]","11111");
		webtest.click("name=submit");
	}
	
	// 架设—超管架构—模块架设—增加条目并提交
	@Test(priority = 1)
	public void test1() throws InterruptedException {
		// 获取架设页面
		webtest.click("xpath=//a[@class='atm_m1adm']");
		webtest.click("xpath=//a[text()='模块架设']");
		// 进行子框架的获取
		webtest.enterFrame("adf_main");
		webtest.click("xpath=//a[@class='tc h150']");
		webtest.click("xpath=//a[text()='增加条目>>']");
		webtest.enterFrame("xpath=//*[@class='layui-layer-content']/iframe");
		webtest.click("xpath=//a[text()='fm[title]']");
		webtest.type("name=fm[title]", "文档");
		webtest.click("xpath=//input[@class='btn']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—模块架设—修改第一个内容并提交
	@Test(priority = 2)
	public void test2() {
		webtest.click("xpath=//a[text()='修改']");
		webtest.click("xpath=//input[class='tc']");
		webtest.type("name=fm[title]", "文档/");
		webtest.click("xpath=//input[@class='btn']");
		webtest.alertAccept();

	}

	// 架设—超管架构—模块架设—点击右侧下拉菜单能否正常并显示界面，切换界面时是否能正常跳转
	@Test(priority = 3)
	public void test3() {
		webtest.click("xpath=//*[@id=\"adi_links\"]/i");
	}

	// 架设—超管架构—模块架设—点击右侧链接能否正常并显示界面，切换界面时是否能正常跳转
	@Test(priority = 4)
	public void test4() {
		webtest.click("xpath=//a[text()='互动/评论']");
		webtest.click("xpath=//a[text()='用户/会员']");
		webtest.click("xpath=//a[text()='广告/连接']");
		webtest.click("xpath=//a[text()='分类/组系']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—模块架设—执行按钮操作情况
	@Test(priority = 5)
	public void test5() {
		webtest.enterFrame("adf_main");
		webtest.click("xpath=//a[@class='pcbody']");
		webtest.click("xpath=//input[@name='fs[docs]']");
		webtest.click("xpath=//a[@class='recbk']");
		webtest.click("xpath=//input[@name='bsend']");
		webtest.alertAccept();
		webtest.leaveFrame();
	}

	// 架设—超管架构—模块架设—刷新按钮操作情况
	@Test(priority = 6)
	public void test6() {
		webtest.enterFrame("adf_main");
		webtest.click("xpath=//a[@class='fa fa-refresh']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—模块架设—互动/评论中字段的表单效果修改测试
	@Test(priority = 7)
	public void test7() {
		//	获取架设页面
		webtest.click("xpath=//a[@class='atm_m1adm']");
		webtest.click("xpath=//a[text()='模块架设']");
		// 进行子框架的获取
		webtest.enterFrame("adf_main");
		webtest.click("xpath=//a[@class='pcbody']");
		webtest.click("xpath=//a[text()='互动/评论']");
		webtest.click("xpath=//a[@class='recbk']");
		webtest.click("xpath=//a[text()='字段']");
		webtest.click("xpath=//a[text()='表单效果>>']");
		webtest.click("xpath=//input[@name='fm[lpid_refname]']");
		webtest.type("name=fm[lpid_refname]", "dddd");
		webtest.click("xpath=//input[@name='fm[mname]']");
		webtest.type("name=fm[mname]", "七七");
		webtest.click("xpath=//input[@type='submit']");
		webtest.click("xpath=//a[text()='<<返回[字段列表]']");
	}

	// 架设—超管架构—模块架设—互动/评论中字段的修改备注测试
	@Test(priority = 8)
	public void test8() {
		webtest.click("xpath=//a[text()='字段']");
		webtest.click("xpath=//a[text()='修改']");
		webtest.enterFrame("xpath=//*[@class='layui-layer-content']/iframe");
		webtest.click("xpath=//*[@id=\"fmlist\"]/div/table/tbody/tr[7]/td[2]/textarea");
		webtest.type("xpath=//input[@name='fm[cfgs]']", "77");
		webtest.click("xpath=//input[@name='bsend']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—模块架设—互动/评论中字段的<<返回[模型列表]测试
	@Test(priority = 9)
	public void test9() {
		webtest.click("xpath=//a[text()='<<返回[模型列表]']");
	}

	// 架设—超管架构—模块架设—互动/评论中复制测试
	@Test(priority = 10)
	public void test10() {
		webtest.click("xpath=//*[@id='fmlist']/div/table/tbody/tr[2]/td[8]/a");
		webtest.enterFrame("xpath=//*[@class='layui-layer-content']/iframe");
		webtest.click("xpath=//*[@class='btn']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—模块架设—用户/会员中复制测试
	@Test(priority = 11)
	public void test11() {
		webtest.click("xpath=//a[text()='用户/会员']");
		webtest.click("xpath=//a[@class='recbk']");
		webtest.click("xpath=//*[@id='fmlist']/div/table/tbody/tr[2]/td[9]/a");
		webtest.enterFrame("layui-layer-iframe1");
		webtest.click("xpath=//*[@class='btn']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—模块架设—用户/会员中修改备注测试
	@Test(priority = 12)
	public void test12() {
		webtest.click("xpath=//a[text()='用户/会员']");
		webtest.click("xpath=//a[@class='recbk']");
		webtest.click("xpath=//a[text()='修改']");
		webtest.click("xpath=//*[@class='btn']");
		webtest.alertAccept();
	}

	// 架设—超管架构—模块架设—用户/会员字段修改备注链接测试
	@Test(priority = 13)
	public void test13() {
		webtest.click("xpath=//a[text()='用户/会员']");
		webtest.click("xpath=//a[@class='recbk']");
		webtest.click("xpath=//a[text()='字段']");
		webtest.click("xpath=//*[@id='fmlist']/div/table/tbody/tr[2]/td[10]/a");
		webtest.enterFrame("xpath=//*[@class='layui-layer-content']/iframe");
		webtest.typeAndClear("name=fm[title]", "七七");
		webtest.click("xpath=//*[@name='bsend']");
		webtest.alertAccept();
		webtest.leaveFrame();
		webtest.click("xpath=//html/body/div[3]/span[1]/a[3]");
	}

	// 架设—超管架构—模块架设—用户/会员字段中执行操作测试
	@Test(priority = 14)
	public void test14() {
		webtest.click("xpath=//*[@name='fs[mname]']");
		webtest.click("xpath=//*[@name='bsend']");
		webtest.alertAccept();
	}

	// 架设—超管架构—模块架设—用户/会员字段中<<返回[模型列表]链接测试
	@Test(priority = 15)
	public void test15() {
		webtest.click("xpath=//html/body/table/tbody/tr/th/a[1]");
	}

	// 架设—超管架构—模块架设—广告/连接执行操作测试
	@Test(priority = 16)
	public void test16() {
		webtest.click("xpath=//a[text()='广告/连接']");
		webtest.click("xpath=//*[@id='fmlist']/div/table/tbody/tr[2]/td[1]/input");
		webtest.click("xpath=//*[@name='bsend']");
		webtest.alertAccept();
	}

	// 架设—超管架构—模块架设—广告/连接修改备注测试
	@Test(priority = 17)
	public void test17() {
		webtest.click("xpath=//a[text()='修改']");
		webtest.typeAndClear("name=fm[note]", "七七");
		webtest.click("xpath=//input[@name='bsend']");
		webtest.alertAccept();
	}

	// 架设—超管架构—模块架设—广告/连接添加条目测试
	@Test(priority = 18)
	public void test18() {
		webtest.click("xpath=//a[text()='增加条目>>']");
		webtest.enterFrame("xpath=//*[@class='layui-layer-content']/iframe");
		webtest.type("name=fm[title]", "七七七七");
		webtest.click("xpath=//input[@name='bsend']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—模块架设—分类/组系执行操作测试
	@Test(priority = 19)
	public void test19() {
		webtest.click("xpath=//a[text()='分类/组系']");
		webtest.click("xpath=//*[@id='fmlist']/div/table/tbody/tr[2]/td[1]/input");
		webtest.click("xpath=//input[@name='bsend']");
		webtest.alertAccept();
	}

	// 架设—超管架构—模块架设—分类/组系添加条目测试
	@Test(priority = 20)
	public void test20() {
		webtest.click("xpath=//a[text()='增加条目>>']");
		webtest.enterFrame("xpath=//*[@class='layui-layer-content']/iframe");
		webtest.click("xpath=//a[@name='fm[title]']");
		webtest.type("name=fm[title]", "七七七七");
		webtest.click("xpath=//input[@name='bsend']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—模块架设—群组/模块添加条目测试
	@Test(priority = 21)
	public void test21() {
		webtest.click("xpath=//a[text()='群组/模块']");
		webtest.click("xpath=//a[text()='增加条目>>']");
		webtest.enterFrame("xpath=//*[@class='layui-layer-content']/iframe");
		webtest.click("xpath=//a[@name='fm[title]']");
		webtest.type("name=fm[title]", "七七七七");
		webtest.click("xpath=//input[@name='bsend']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—模块架设—菜单/导航添加条目测试
	@Test(priority = 22)
	public void test22() {
		webtest.click("xpath=//a[text()='菜单/导航']");
		webtest.click("xpath=//a[text()='增加条目>>']");
		webtest.enterFrame("xpath=//*[@class='layui-layer-content']/iframe");
		webtest.click("xpath=//a[@name='fm[title]']");
		webtest.type("name=fm[title]", "七七七七");
		webtest.click("xpath=//input[@name='bsend']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—模块架设—设置/核心添加条目测试
	@Test(priority = 23)
	public void test23() {
		webtest.click("xpath=//a[text()='设置/核心']");
		webtest.click("xpath=//a[text()='增加条目>>']");
		webtest.enterFrame("layui-layer-iframe1");
		webtest.click("xpath=//a[@name='fm[title]']");
		webtest.type("name=fm[title]", "七七七七");
		webtest.click("xpath=//input[@name='bsend']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—模块架设—设置/会员添加条目测试
	@Test(priority = 24)
	public void test24() {
		webtest.click("xpath=//a[text()='设置/会员']");
		webtest.click("xpath=//a[text()='增加条目>>']");
		webtest.enterFrame("xpath=//*[@class='layui-layer-content']/iframe");
		webtest.typeAndClear("name=fm[kid]", "key");
		webtest.type("name=fm[title]", "七七七七");
		webtest.click("xpath=//input[@name='bsend']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—模块架设—插件/接口添加条目测试
	@Test(priority = 25)
	public void test25() {
		webtest.click("xpath=//a[text()='插件/接口']");
		webtest.click("xpath=//a[text()='增加条目>>']");
		webtest.enterFrame("xpath=//*[@class='layui-layer-content']/iframe");
		webtest.type("name=fm[title]", "七七七七");
		webtest.click("xpath=//input[@name='bsend']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—模块架设—设置/核心参数设置链接测试
	@Test(priority = 26)
	public void test26() {
		webtest.click("xpath=//a[text()='设置/核心']");
		webtest.click("xpath=//a[text()='参数设置']");
		webtest.click("xpath=//a[text()='核心设置']");
		webtest.click("xpath=//a[text()='基本开关']");
		webtest.click("xpath=//a[text()='安全参数']");
		webtest.click("xpath=//a[text()='显示参数']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—模块架设—设置/核心参数设置返回和更新链接测试
	@Test(priority = 27)
	public void test27() {
		webtest.click("xpath=//a[text()='[更新参数]>>']");
		webtest.click("xpath=//*[@id='layui-layer1']/span[1]/a[3]");
		webtest.click("xpath=//a[text()='<<[返回模型]']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—扩展—扩展界面相关链接测试
	@Test(priority = 28)
	public void test28() {
		webtest.click("xpath=//a[text()='升级当前系统']");
		webtest.click("xpath=//a[text()='导入旧版数据']");
		webtest.click("xpath=//a[text()='贴心扩展[Extend]']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—扩展—扩展贴心扩展[Extend]模块相关链接测试
	@Test(priority = 29)
	public void test29() {
		webtest.click("xpath=//a[text()='贴心扩展[Extend]']");
		webtest.click("xpath=//a[text()='UEditor(富文本web编辑器)']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—管理员—执行操作测试
	@Test(priority = 30)
	public void test30() {
		// 获取架设页面
		webtest.click("xpath=//a[@class='atm_m1adm']");
		webtest.click("xpath=//a[text()='管理员']");
		// 进行子框架的获取
		webtest.enterFrame("adf_main");
		webtest.click("xpath=//*[@id='fmlist']/div/table/tbody/tr[2]/td[1]/input");
		webtest.click("xpath=//*a[@name='bsend']");
	}

	// 架设—超管架构—管理员—增加资料测试
	@Test(priority = 31)
	public void test31() {
		webtest.click("xpath=//*[@id='adminer_add']");
		webtest.click("xpath=//*[@id='fm[upass]']");
		webtest.type("id=fm[upass]", "pass_122");
		webtest.click("xpath=//*[@id='fm[mname]']");
		webtest.type("id=fm[mname]", "111111");
		webtest.click("xpath=//*[@id='fm[indep]']");
		webtest.click("xpath=//*[@value='inpro']");
		webtest.click("xpath=//*[@id='fm[mtel]']");
		webtest.type("id=fm[mtel]", "11111");
		webtest.click("xpath=//*[@name='bsend']");
		webtest.alertAccept();
		webtest.leaveFrame();
	}

	// 架设—超管架构—管理员—修改信息测试
	@Test(priority = 32)
	public void test32() {
		webtest.click("xpath=//a[text()='修改']");
		webtest.click("xpath=//*[@id='fm[mname]']");
		webtest.type("id=fm[mname]", "11");
		webtest.click("xpath=//*[@name='bsend']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—栏目管理—添加条目测试
	@Test(priority = 33)
	public void test33() {
		// 获取架设页面
		webtest.click("xpath=//a[@class='atm_m1adm']");
		webtest.click("xpath=//a[text()='栏目管理']");
		// 进行子框架的获取
		webtest.enterFrame("adf_main");
		webtest.click("xpath=//a[text()='增加条目>>']");
		webtest.enterFrame("layui-layer-iframe1");
		webtest.click("xpath=//a[@name='fm[title]']");
		webtest.type("name=fm[title]", "1111");
		webtest.click("xpath=//*[@name='bsend']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—栏目管理—相关链接测试
	@Test(priority = 34)
	public void test34() {
		webtest.click("xpath=//a[text()='楼盘']");
		webtest.click("xpath=//a[text()='出售']");
		webtest.click("xpath=//a[text()='出租']");
		webtest.click("xpath=//a[text()='新闻']");
		webtest.click("xpath=//a[text()='专题']");
		webtest.click("xpath=//a[text()='问答']");
		webtest.click("xpath=//a[text()='相册']");
		webtest.click("xpath=//a[text()='动态']");
		webtest.click("xpath=//a[text()='网站介绍']");
		webtest.click("xpath=//a[text()='户型图']");
	}

	// 架设—超管架构—栏目管理—网站介绍中设置相关链接测试
	@Test(priority = 35)
	public void test35() {
		webtest.click("xpath=//a[text()='网站介绍']");
		webtest.click("xpath=//a[text()='设置']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—广告—相关链接测试
	@Test(priority = 36)
	public void test36() {
		// 获取架设页面
		webtest.click("xpath=//a[@class='atm_m1adm']");
		webtest.click("xpath=//a[text()='广告']");
		// 进行子框架的获取
		webtest.enterFrame("adf_main");
		webtest.click("xpath=//a[text()='文字连接']");
		webtest.click("xpath=//a[text()='图片连接']");
		webtest.click("xpath=//a[text()='文本块']");
		webtest.click("xpath=//a[text()='手动推送']");
		webtest.click("xpath=//a[text()='网址收藏']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—广告—增加条目测试
	@Test(priority = 37)
	public void test37() {
		// 获取架设页面
		webtest.click("xpath=//a[@class='atm_m1adm']");
		webtest.click("xpath=//a[text()='广告']");
		// 进行子框架的获取
		webtest.enterFrame("adf_main");
		webtest.click("xpath=//a[text()='增加条目>>']");
		webtest.enterFrame("layui-layer-iframe1");
		webtest.click("xpath=//*a[@name='fm[kid]']");
		webtest.type("name=fm[kid]", "1");
		webtest.click("xpath=//a[@name='fm[title]']");
		webtest.type("name=fm[title]", "1111");
		webtest.click("xpath=//*[@name='bsend']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—广告—子项目链接跳转测试
	@Test(priority = 38)
	public void test38() {
		webtest.click("xpath=//a[text()='2']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—广告—子项目中首页和顶级链接跳转测试
	@Test(priority = 39)
	public void test39() {
		// 获取架设页面
		webtest.click("xpath=//a[@class='atm_m1adm']");
		webtest.click("xpath=//a[text()='广告']");
		// 进行子框架的获取
		webtest.enterFrame("adf_main");
		webtest.click("xpath=//a[text()='2']");
		webtest.click("xpath=//a[text()='顶级']");
		webtest.click("xpath=//a[text()='2']");
		webtest.click("xpath=//a[text()='首页广告']");
		webtest.leaveFrame();
	}

	// 架设—超管架构—等级权限设置—经纪人中提交测试
	@Test(priority = 40)
	public void test40() {
		webtest.click("xpath=//a[text()='经纪人']");
		webtest.click("xpath=//a[text()='设置']");
		webtest.click("xpath=//a[text()='楼盘(house)']");
		webtest.click("xpath=//a[text()='意向需求_复制(c1012)']");
		webtest.click("xpath=//a[text()='管理员(adminer)']");
		webtest.click("xpath=//a[text()='文字连接(adtext)']");
		webtest.click("xpath=//a[text()='短信接口(apisms)']");
		webtest.click("xpath=//input[@name='bsend']");
		webtest.alertAccept();
		webtest.leaveFrame();
	}

	// 架设—超管工具—安全参数—更新参数测试
	@Test(priority = 41)
	public void test41() {
		webtest.click("xpath=//a[text()='安全参数']");
		webtest.enterFrame("adf_main");
		webtest.click("xpath=//a[text()='[更新参数]>>']");
		webtest.click("xpath=//*[@id='layui-layer2']/span[1]/a[3]");
	}
	
}
